import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const ad: AppRouteRecordRaw = {
  path: '/ad',
  name: 'ad',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '广告管理',
    requiresAuth: true,
    icon: 'icon-menu-unfold',
    order: 8,
  },
  children: [
    {
      path: 'adList',
      name: 'adList',
      component: () => import('@/views/ad/adList.vue'),
      meta: {
        locale: '广告列表',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'addAd',
      name: 'addAd',
      component: () => import('@/views/ad/addAd.vue'),
      meta: {
        locale: '添加广告',
        requiresAuth: true,
        roles: ['*'],
      },
    }
  ],
};

export default ad;
